﻿using System;
using System.ComponentModel;

namespace Tms.Model
{
    //单次刺激-明细表3
    //TMS_single_detail --> TMS_single_report --> TMS_ncs_detail
    //A&B、单拍同步，如何计算传导时间？ //【todo】暂不实现
    //
    public class ncs_detail : INotifyPropertyChanged 
    {
        //常规字段
        private int _id;                            //自增id        
        private string _patient_no;                 //患者编号
        private string _patient_name;               //患者姓名
        private string _user_name;                  //登录账号  //【todo】无需该字段
        private string _doctor_name;                //医生姓名  //【todo】无需该字段
        private string _ncs_item_name;              //NCS项目名称
        private string _record_body_name;           //采集部位
        private string _stim_body_name1;            //刺激部位1
        private string _stim_body_name2;            //刺激部位2
        private string _conduction_time;            //【传导时间】
        private string _single_detail_id1;          //来自 single_detail  //【OK】
        private string _single_detail_id2;          //来自 single_detail  //【OK】
        private DateTime _add_time = DateTime.Now;  //记录时间

        #region 属性

        //自增ID   
        public int id
        {
            get { return _id; }
            set { _id = value; NotifyPropertyChanged("id"); }
        }

        //
        public string patient_no
        {
            get { return _patient_no; }
            set { _patient_no = value; NotifyPropertyChanged("patient_no"); }
        }
        //
        public string patient_name
        {
            get { return _patient_name; }
            set { _patient_name = value; NotifyPropertyChanged("patient_name"); }
        }
        //
        public string user_name
        {
            get { return _user_name; }
            set { _user_name = value; NotifyPropertyChanged("user_name"); }
        }
        //
        public string doctor_name
        {
            get { return _doctor_name; }
            set { _doctor_name = value; NotifyPropertyChanged("doctor_name"); }
        }
        //
        public string ncs_item_name
        {
            get { return _ncs_item_name; }
            set { _ncs_item_name = value; NotifyPropertyChanged("ncs_item_name"); }
        }
        //
        public string record_body_name
        {
            get { return _record_body_name; }
            set { _record_body_name = value; NotifyPropertyChanged("record_body_name"); }
        }
        //
        public string stim_body_name1
        {
            get { return _stim_body_name1; }
            set { _stim_body_name1 = value; NotifyPropertyChanged("stim_body_name1"); }
        }
        //
        public string stim_body_name2
        {
            get { return _stim_body_name2; }
            set { _stim_body_name2 = value; NotifyPropertyChanged("stim_body_name2"); }
        }
        //
        public string conduction_time
        {
            get { return _conduction_time; }
            set { _conduction_time = value; NotifyPropertyChanged("conduction_time"); }
        }
        //
        public string single_detail_id1
        {
            get { return _single_detail_id1; }
            set { _single_detail_id1 = value; NotifyPropertyChanged("single_detail_id1"); }
        }
        //
        public string single_detail_id2
        {
            get { return _single_detail_id2; }
            set { _single_detail_id2 = value; NotifyPropertyChanged("single_detail_id2"); }
        }

        //添加时间
        public DateTime add_time
        {
            get { return _add_time; }
            set { _add_time = value; NotifyPropertyChanged("add_time"); }
        }

        #endregion

        /***********************************************************/

        //接口实现
        public event PropertyChangedEventHandler PropertyChanged;
        private void NotifyPropertyChanged(string propertyName)
        {
            if (PropertyChanged != null)
            {
                PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
            }
        }

    }
}
